package com.xl.activiti.demo.task;

import lombok.extern.slf4j.Slf4j;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.Expression;
import org.activiti.engine.delegate.JavaDelegate;

/**
 * @author zhongwm
 */
@Slf4j
public class HelloService implements JavaDelegate {

    private Expression username;

    public void setUsername(Expression username) {
        this.username = username;
    }

    @Override
    public void execute(DelegateExecution delegateExecution) {
        String user = (String) username.getValue(delegateExecution);
        log.info("Hello {}. delegateExecution:{}", user, delegateExecution);
    }
}
